<?php
namespace app\common\validate;

use think\Validate;

class AnchorValidate extends Validate{

    protected $rule = [
        'name'=>'require',    //名称可以相同
        'url'=>'require',
    ];

    protected $message = [
        'name.require'=>'名称不能为空',
        'url.require'=>'链接不能为空',
    ];

    protected $scene = [
        'add' => ['name','url'],
        'edit'=> ['name','url'],
    ];
}